<?php
class Autor_ping_to {

	private $to_autor_login;
	private $from_autor_login;
	private $comment;
	private $type;
	private $date;	
	private $state;	

	
	public function __construct($to_autor_login, 
									$from_autor_login, $comment, $type, $date, $state){
									 
		$this->to_autor_login = $to_autor_login; 
		$this->from_autor_login = $from_autor_login;
		$this->comment = $comment;
		$this->type = $type;
		$this->date = $date;
		$this->state = $state;			
	}

	public function get_to_autor_login() {
		return $this->to_autor_login; 
	}
	
	public function get_from_autor_login() {
		return $this->from_autor_login; 
	}

	public function get_comment() {
		return $this->comment; 
	}
	
	public function get_type() {
		return $this->type; 
	}
	
	public function get_date() {
		return $this->date;
	}
	
	public function get_state() {
		return $this->state;
	}
	
	public function set_state($state) {
		$this->state = $state;
	}
	
	public function equals($object) {
		if ((get_class($this) != get_class($object)) ||
				($object == null))				
			 return false;
		else {
			if (($this->to_autor_login == $object->get_to_autor_login()) &&
				($this->from_autor_login == $object->get_from_autor_login()) &&
				($this->comment == $object->get_comment()) &&
				($this->type == $object->get_type()) &&
				($this->date == $object->get_date()) &&
				($this->state == $object->get_state()))
				return true;
			return false;
		}
	}
	
	public function to_string() {
		return 'to_autor_login: ' . $this->to_autor_login . ' | ' .
				'from autor login: ' . $this->from_autor_login . ' | ' .
				'comment: ' . $this->comment . ' | ' .
				'type: ' . $this->type . ' | ' .
				'date: ' . $this->date . ' | ' .
				'state: ' . $this->state;
	}
}

?>